import java.security.PublicKey;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        int[] array = new int[5];
        for (int i = 0; i < 5 ; i++) {
            array[i] = i + 1;
        }
        int[] a = Arrays.copyOf(array, array.length);
        for(int x : array){
            System.out.print(x + " ");
        }
        System.out.println();
        for(int x : a){
            System.out.print(x + " ");
        }
        int[] a2 = new int[]{5, 6, 7, 8, 9};
        System.arraycopy(a, 0, a2, 0, a.length);
        System.out.println();
        for(int x : a2){
            System.out.print(x + " ");
        }
        System.out.println();
        int[][] a3 = new int[][]{{1, 2, 3}, {4, 5, 6}};
        for (int i = 0; i < a3.length; i++) {
            for (int j = 0; j < a3[i].length; j++) {
                System.out.print(a3[i][j] + " ");
            }
            System.out.println();
        }
       boolean flag = Arrays.equals(a, a2);
        if(flag == true){
            System.out.println("相等");
        }else{
            System.out.println("不相等");
        }
    }

}